package Homework.cms.util;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;


public class BaseDao<T extends Object> {

	public boolean add(T t)
	{
		return false;
	}
	public boolean delete(Serializable id)
	{
		return false;
	}
	public boolean update(T t)
	{
		return false;
	}
	public T getModel(ResultSet rs,Class<T> classz)
	{
		T t=null;
		try {
			t = DaoHelper.getModel(rs,classz);
		} catch (Exception e) {
			System.out.println("BaseDao处理异常："+e.getMessage());
		}
		return t;
	}
	public List<T> getList(ResultSet rs,Class<T> classz)
	{
		List<T> lst=null;
		try {
			lst = DaoHelper.getList(rs,classz);
		} catch (Exception e) {
			System.out.println("BaseDao处理异常："+e.getMessage());
		}
		
		return lst;
	}
	
}
